package org.jeecg.modules.power.shop.entity;

import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.Field;
import java.util.*;
import java.math.BigDecimal;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.NonNull;
import org.apache.poi.ss.formula.functions.T;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.power.util.annotation.NullNote;
import org.jeecg.modules.power.util.pack.Pack;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @Description: 门店表
 * @Author: jeecg-boot
 * @Date:   2024-07-08
 * @Version: V1.0
 */
@Data
@TableName("yl_shop")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="yl_shop对象", description="门店表")
public class YlShop implements Serializable {
    private static final long serialVersionUID = 1L;

	/**id*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "id")
    private java.lang.String id;
	/**店铺名称*/
	@Excel(name = "店铺名称", width = 15)
    @ApiModelProperty(value = "店铺名称")
    @NullNote(value = "店铺名称",rules = "test1,test2")
    private java.lang.String shopName;
	/**店铺Logo*/
	@Excel(name = "店铺Logo", width = 15)
    @ApiModelProperty(value = "店铺Logo")
    @NullNote(value = "店铺Logo",rules = "test1,test2,test3")
    private java.lang.String shopLogo;
	/**门店BD*/
	@Excel(name = "门店BD", width = 15)
    @ApiModelProperty(value = "门店BD")
    @NullNote(value = "门店BD",rules = "test2")
    private java.lang.String shopBd;
	/**门店BD的Id*/
	@Excel(name = "门店BD的Id", width = 15)
    @ApiModelProperty(value = "门店BD的Id")
//    @NullNote(value = "门店BD的Id",rules = "test2")
    private java.lang.String bdId;
	/**门店品类*/
	@Excel(name = "门店品类", width = 15)
    @ApiModelProperty(value = "门店品类")
    @NullNote(value = "门店品类",rules = "test1")
    private java.lang.String shopCategory;
    /**组织ID（小组ID，对应yl_group表的id）*/
    @ApiModelProperty(value = "组织")
    @NullNote(value = "组织",rules = "test1")
    private java.lang.String orgId;
	/**门店省市区*/
	@Excel(name = "门店省市区", width = 15)
    @ApiModelProperty(value = "门店省市区")
    private java.lang.String shopArea;
	/**店铺位置*/
	@Excel(name = "店铺位置", width = 15)
    @ApiModelProperty(value = "店铺位置")
    private java.lang.String shopAddress;
	/**经纬度*/
	@Excel(name = "经纬度", width = 15)
    @ApiModelProperty(value = "经度")
    private java.lang.String shopLng;
	/**经纬度*/
	@Excel(name = "经纬度", width = 15)
    @ApiModelProperty(value = "纬度")
    private java.lang.String shopLat;
	/**路*/
	@Excel(name = "路", width = 15)
    @ApiModelProperty(value = "路")
    private java.lang.String shopRoad;
	/**门牌号*/
	@Excel(name = "门牌号", width = 15)
    @ApiModelProperty(value = "门牌号")
    private java.lang.String houseNumber;
	/**补充地址*/
	@Excel(name = "补充地址", width = 15)
    @ApiModelProperty(value = "补充地址")
    private java.lang.String suppleAddress;
	/**楼层*/
	@Excel(name = "楼层", width = 15)
    @ApiModelProperty(value = "楼层")
    private java.lang.String shopFloor;
	/**门头照*/
	@Excel(name = "门头照", width = 15)
    @ApiModelProperty(value = "门头照")
    private java.lang.String shopImage;
	/**是否有竞对*/
	@Excel(name = "是否有竞对", width = 15)
    @ApiModelProperty(value = "是否有竞对")
    private java.lang.String competition;
	/**营业时间*/
	@Excel(name = "营业时间", width = 15)
    @ApiModelProperty(value = "营业时间")
    private java.lang.String businessTime;
	/**联系人*/
	@Excel(name = "联系人", width = 15)
    @ApiModelProperty(value = "联系人")
    private java.lang.String contactsName;
	/**联系电话*/
	@Excel(name = "联系电话", width = 15)
    @ApiModelProperty(value = "联系电话")
    private java.lang.String contactsTel;
	/**座机*/
	@Excel(name = "座机", width = 15)
    @ApiModelProperty(value = "座机")
    private java.lang.String contactsMobile;
	/**设备图片*/
	@Excel(name = "设备图片", width = 15)
    @ApiModelProperty(value = "设备图片")
    private java.lang.String deviceImage;
	/**设备位置*/
	@Excel(name = "设备位置", width = 15)
    @ApiModelProperty(value = "设备位置")
    private java.lang.String deviceLocation;
	/**设备描述*/
	@Excel(name = "设备描述", width = 15)
    @ApiModelProperty(value = "设备描述")
    private java.lang.String deviceDescription;
	/**运营BD与门头合照*/
	@Excel(name = "运营BD与门头合照", width = 15)
    @ApiModelProperty(value = "运营BD与门头合照")
    private java.lang.String bdImage;
	/**营业执照*/
	@Excel(name = "营业执照", width = 15)
    @ApiModelProperty(value = "营业执照")
    private java.lang.String businessImage;
	/**门店备注信息*/
	@Excel(name = "门店备注信息", width = 15)
    @ApiModelProperty(value = "门店备注信息")
    private java.lang.String shopRemark;
	/**门店状态*/
	@Excel(name = "门店状态", width = 15)
    @ApiModelProperty(value = "门店状态")
    @Dict(dicCode = "shop_status")
    private java.lang.Integer shopStatus;
    /**审核意见*/
    @ApiModelProperty(value = "审核意见")
    private java.lang.String checkRemark;
    /**认领时间*/
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "认领时间")
    private java.util.Date claimTime;
	/**创建人*/
    @ApiModelProperty(value = "创建人")
    private java.lang.String createBy;
	/**创建日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private java.util.Date createTime;
	/**更新人*/
    @ApiModelProperty(value = "更新人")
    private java.lang.String updateBy;
	/**更新日期*/
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    private java.util.Date updateTime;


    private java.lang.String shopMemberId;//门店会员类型id（yl_shop_member_type 表的id）


    private Integer  kaShop;//是否是KA门店 是否是KA门店  0否  1 是



    /**
     * 距离
     */
    @TableField(exist = false)
    private Integer distance;

    public static Pack<YlShop> getShop(String shopInfo){
        YlShop ylShop = JSONObject.parseObject(shopInfo,YlShop.class);
        Pack<YlShop> pack = new Pack<>(ylShop);
        return pack;
    }

//    public static void main(String[] args) {
//        String shopInfo = "{\"shopName\":\"测试门店\",\"shopBd\":\"测试BD\"}";
//        YlShop ylShop = JSONObject.parseObject(shopInfo,YlShop.class);
//        Pack<YlShop> pack = new Pack<>(ylShop);
//        if(pack.isSuccess){
//            System.out.println("single:"+JSONObject.toJSONString(pack.getData()));
//            System.out.println("Multiply:"+JSONObject.toJSONString(pack.getMultiplyData()));
//        }
//        if(!pack.isSuccess){
//            System.out.println(pack.getMessage());
////            System.out.println(pack.getMessage());
//            System.out.println("Multiply:"+JSONObject.toJSONString(pack.getMultiplyData()));
//            Map<String,Pack<YlShop>> packMap = pack.getMultiplyData();
//            for(String key:packMap.keySet()){
//                Pack<YlShop> packs = packMap.get(key);
//                System.out.println("key:"+key);
//                System.out.println("value:"+packs.getMessage());
//            }
//        }
//
//    }


}
